﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;
using FarseerPhysics.Dynamics;
using FarseerPhysics.Factories;
using FarseerPhysics.SamplesFramework;

using game;

namespace game.Blocks
{
    /// <summary>
    /// Bazowy block - zawierajacy podstawowe metody i pola dla blokow (ground i hell)
    /// </summary>
    public class CBaseBlock
    {
        protected CSprite _sprite;

        protected CBaseBlock(){}
        /// <summary>
        /// Texture bloku zostanie przeskalowana do pozadanej szerokosci i wysokosci
        /// </summary>
        /// <param name="iDestWidth"></param>
        /// <param name="iDestHeight"></param>
        public CBaseBlock(World world, Vector2 position,bool bIsStatic)
        {
            _sprite = new CSprite(world, CContentLoader.LoadTexture("DefaultBlockTexture"), position, bIsStatic);
            _sprite.Body.Enabled = true;
        }

        public virtual void Draw(SpriteBatch spriteBatch)
        {
            _sprite.Draw(spriteBatch);
        }

        public virtual void Update(float fDeltaT){}
    }
}
